<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.eagle.commons.vo.tbl_PosOperatorDic"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>操作日志信息查询</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<jsp:include page="../common/easyui.jsp"></jsp:include>
	<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/util.js"></script>
	<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
	<script type='text/javascript' src="<%=request.getContextPath()%>/dwr/interface/PrintDwr.js"></script>
	 <script type="text/javascript">
	 <% tbl_PosOperatorDic posoper = (tbl_PosOperatorDic)session.getAttribute("posoper");
       	  Integer posID = posoper.getBL_PosID();
       %>
	 //查询该时间内的操作日志
	 $(function(){
	 $('#print').datagrid({
				iconCls:'icon-save',
				height:320,
				pagination:true,
				autoRowHeight: false,
				striped: true,
				collapsible:true,
				rownumbers:true,
				url:'showInfoAction!showLog.action',
				singleSelect:true,
				fitColumns:false,
				columns:[[
					{field:'str_OperTime',title:'操作时间',width:140},
					{field:'posName',title:'办理网点',width:140},
					{field:'operName',title:'办理操作员',width:140},
					{field:'operType',title:'操作类型',width:140,
					 formatter: function(value,row,index){
				                      if (row.operType==1){
					                   	return '上班领用';
			                           } else if(row.operType==2)
			                           {
				                        return '下班上缴';
			                           }else if(row.operType==3)
			                           {
				                        return '入库';
			                           }else if(row.operType==4)
			                           {
				                        return '出库';
			                           }else if(row.operType==5)
			                           {
				                        return '正常使用';
			                           }else if(row.operType==6)
			                           {
				                        return '重打';
			                           }else if(row.operType==14)
			                           {
				                        return '废票录入';
			                           }else if(row.operType==15)
			                           {
				                        return '票据核销';
			                           }else if(row.operType==16)
			                           {
				                        return '操作员信息修改';
			                           }else if(row.operType==17)
			                           {
				                        return '系统登录';
			                           }
			                           
			                           
			                           
			              }
					},
					{field:'content',title:'操作内容',width:430},
					{field:'result',title:'操作结果',
					formatter: function(value,row,index){
				                      if (row.result==0){
					                   	return '失败';
			                           } else if(row.result==1){
				                        return '成功';
			                           }
						}
					}
				]]
				});
				
	 });
	 function doSearch(){ 
		 $('#print').datagrid('load',{    
          operID: $('#operID').val(),    
         // operType: $('#operType').val(),
          operType:$('#operType').combobox('getValue'),
          beginTime: $('#beginTime').datebox('getValue'),
          endTime: $('#endTime').datebox('getValue')
        });    
 	 }  
	 </script>
	 
  </head>
  
  <body>
   <div id="searchDiv" class="easyui-panel"  title="发票打印——查询条件" style="background-color:#EBF2FF;" collapsible="true">
		<form id="searchForm" method="post" style="margin-top:10px" action="">
	           <table >
					<tr>
						<td width="5%" align="right">
							<div style="font-family:微软雅黑;font-size:12px;">操作员 编号&nbsp;&nbsp;</div>
						</td>
						<td width="8%" align="left">
							<input  class="easyui-validatebox" data-options="required:true"  type="text"  id="operID" name="operID" style="width:120px;border:1px solid #ccc" />
						</td>
						<td width="3%" >
							<div style="font-family:微软雅黑;font-size:12px;">操作类型</div>
						</td>
						<td width="8%" align="left">
							<!-- <input  class="easyui-validatebox" data-options="required:true" 
							type="text"  id="operType" name="operType" style="width:120px;border:1px solid #ccc" /> -->
							<select id="operType" class="easyui-combobox" name="operType" style="width:120px;border:1px solid #ccc" >  
								<option value="">请选择操作类型</option> 
    							<option value="1">上班领用</option>   
    							<option value="2">下班上缴</option>   
    							<option value="3">入库</option>   
    							<option value="4">出库</option>   
    							<option value="5">正常使用</option> 
    							<option value="6">重打</option>   
    							<option value="13">补打</option>   
    							<option value="14">废票录入</option>   
    							<option value="15">票据核销</option>
    							<option value="16">操作员信息修改</option>
    							<option value="17">系统登录</option>   
							</select> 
						</td>
						<td width="5%" align="right">
							<div style="font-family:微软雅黑;font-size:12px;">开始时间:</div>
						</td>
						<td width="8%" align="left">
							<input class="easyui-datebox" data-options="required:true"  type="text"  id="beginTime" name="beginTime" style="width:120px;border:1px solid #ccc" />
						</td>
						<td width="5%" align="right">
							<div style="font-family:微软雅黑;font-size:12px;">截止时间:</div>
						</td>
						<td width="8%" align="left">
							<input class="easyui-datebox" data-options="required:true"  type="text"  id="endTime" name="endTime" style="width:120px;border:1px solid #ccc" />
						</td>
					</tr>
					</table>
					<div align="center">
					<table >
					<tr></tr>
					<tr></tr>
					<tr>
						<td colspan="2" width="20%" >
							<table align="center">
								<tr>
									<td width="10%" align="center"> <a href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search"  onclick="doSearch()">查询</a>
									<a href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-redo" onclick="$('#searchForm')[0].reset();" >重置</a>
                                    </td>   
								</tr>
							</table>
						</td>						
					</tr>
				</table>     
				</div>
		 </form>
	</div>
	 <div id="rs" class="easyui-panel"  title="查询结果" style="background-color:#EBF2FF;" collapsible="true">
	 <table id="print" style="width:auto;overflow:auto"></table>    
	 </div>
    <input id="inv" type="hidden"/>
  </body>
</html>
